<template>
  <div class="goods">
    <h4>商品名称: {{item.name  }}</h4>
    <p>商品价格: {{ item.price.toFixed(2)}}</p>
    <p>商品介绍: {{item.info }}</p>
    <button @click="$emit('kan', item.id )">砍一刀</button>
  </div>
</template>

<script>
  export default {
    props: ['item']
  }
</script>

<style lang="scss" scoped>
.goods{ 
  padding: 10px;
  margin: 10px;
  border: 1px solid palevioletred;
  border-radius: 4px;
}
</style>